using net_work.Common.Request;
using net_work.Common.Result;
using net_work.Data.DTO.Cam;
using net_work.Data.Entity.Cam;

namespace net_work.IService.Cam;

public interface IApplyService
{
    /// <summary>
    /// 分页查询审批申请
    /// </summary>
    /// <param name="request">查询参数</param>
    /// <returns>分页结果</returns>
    Task<PagedResult<Apply>> GetApplysPagedAsync(PagedRequest request);

    /// <summary>
    /// 根据审批申请ID查询审批申请信息
    /// </summary>
    /// <param name="applyId">审批申请ID</param>
    /// <returns>审批申请信息</returns>
    Task<Apply?> SelectByIdAsync(long applyId);

    /// <summary>
    /// 插入审批申请
    /// </summary>
    /// <param name="applyAddRequest">新增审批申请实体</param>
    /// <returns>新增的ID</returns>
    Task<long> InsertApply(ApplyAddRequest applyAddRequest);

    /// <summary>
    /// 更新审批申请信息
    /// </summary>
    /// <param name="applyUpdateRequest">更新审批申请信息</param>
    /// <returns>是否成功</returns>
    Task<int> UpdateApply(ApplyUpdateRequest applyUpdateRequest);

    /// <summary>
    /// 删除审批申请
    /// </summary>
    /// <param name="ids">审批申请ID集合</param>
    /// <returns>是否成功</returns>
    Task<int> DeleteApplyByIds(List<long> ids);
}